﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class _Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            SetIndoorImagesUrl();
        }
    }
    protected void Timer1_Tick(object sender, EventArgs e)
    {
        SetIndoorImagesUrl();
        SetOutdoorImagesUrl();
    }

    private void SetIndoorImagesUrl()
    {
        Random _rand = new Random();
        int i = _rand.Next(1, 5);
        Image2.ImageUrl = "~/Indoorimages/" + i.ToString() + ".jpg";
    }
    protected void Timer2_Tick(object sender, EventArgs e)
    {
        SetOutdoorImagesUrl();
    }

    public void SetOutdoorImagesUrl()
    {
        Random _rand2 = new Random();
        int j = _rand2.Next(1, 5);
        Image3.ImageUrl = "~/Outdoorimages/" + j.ToString() + ".jpg";
    }
}